Optimal. Leaf size=248 \[ -\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 d \left (a^2-b^2\right )}-\frac{\left (4 a^2-3 b^2\right ) \sqrt{a+b \sin (c+d x)} E\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{6 d \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{2 a \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{3 d \sqrt{a+b \sin (c+d x)}}+\frac{\tan (c+d x) \sec ^2(c+d x) \sqrt{a+b \sin (c+d x)}}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.37143, antiderivative size = 248, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {2690, 2866, 2752, 2663, 2661, 2655, 2653} \[ -\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 d \left (a^2-b^2\right )}-\frac{\left (4 a^2-3 b^2\right ) \sqrt{a+b \sin (c+d x)} E\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{6 d \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{2 a \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{2} \left (c+d x-\frac{\pi }{2}\right )|\frac{2 b}{a+b}\right )}{3 d \sqrt{a+b \sin (c+d x)}}+\frac{\tan (c+d x) \sec ^2(c+d x) \sqrt{a+b \sin (c+d x)}}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2690
Rule 2866
Rule 2752
Rule 2663
Rule 2661
Rule 2655
Rule 2653
Rubi steps
\begin{align*} \int \sec ^4(c+d x) \sqrt{a+b \sin (c+d x)} \, dx &=\frac{\sec ^2(c+d x) \sqrt{a+b \sin (c+d x)} \tan (c+d x)}{3 d}-\frac{1}{3} \int \frac{\sec ^2(c+d x) \left (-2 a-\frac{3}{2} b \sin (c+d x)\right )}{\sqrt{a+b \sin (c+d x)}} \, dx\\ &=-\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac{\sec ^2(c+d x) \sqrt{a+b \sin (c+d x)} \tan (c+d x)}{3 d}+\frac{\int \frac{-\frac{a b^2}{4}-\frac{1}{4} b \left (4 a^2-3 b^2\right ) \sin (c+d x)}{\sqrt{a+b \sin (c+d x)}} \, dx}{3 \left (a^2-b^2\right )}\\ &=-\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac{\sec ^2(c+d x) \sqrt{a+b \sin (c+d x)} \tan (c+d x)}{3 d}+\frac{1}{3} a \int \frac{1}{\sqrt{a+b \sin (c+d x)}} \, dx-\frac{\left (4 a^2-3 b^2\right ) \int \sqrt{a+b \sin (c+d x)} \, dx}{12 \left (a^2-b^2\right )}\\ &=-\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac{\sec ^2(c+d x) \sqrt{a+b \sin (c+d x)} \tan (c+d x)}{3 d}-\frac{\left (\left (4 a^2-3 b^2\right ) \sqrt{a+b \sin (c+d x)}\right ) \int \sqrt{\frac{a}{a+b}+\frac{b \sin (c+d x)}{a+b}} \, dx}{12 \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{\left (a \sqrt{\frac{a+b \sin (c+d x)}{a+b}}\right ) \int \frac{1}{\sqrt{\frac{a}{a+b}+\frac{b \sin (c+d x)}{a+b}}} \, dx}{3 \sqrt{a+b \sin (c+d x)}}\\ &=-\frac{\left (4 a^2-3 b^2\right ) E\left (\frac{1}{2} \left (c-\frac{\pi }{2}+d x\right )|\frac{2 b}{a+b}\right ) \sqrt{a+b \sin (c+d x)}}{6 \left (a^2-b^2\right ) d \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}+\frac{2 a F\left (\frac{1}{2} \left (c-\frac{\pi }{2}+d x\right )|\frac{2 b}{a+b}\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}}}{3 d \sqrt{a+b \sin (c+d x)}}-\frac{\sec (c+d x) \sqrt{a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac{\sec ^2(c+d x) \sqrt{a+b \sin (c+d x)} \tan (c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 3.29538, size = 270, normalized size = 1.09 \[ \frac{-4 a \left (a^2-b^2\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} F\left (\frac{1}{4} (-2 c-2 d x+\pi )|\frac{2 b}{a+b}\right )+\left (4 a^2 b+4 a^3-3 a b^2-3 b^3\right ) \sqrt{\frac{a+b \sin (c+d x)}{a+b}} E\left (\frac{1}{4} (-2 c-2 d x+\pi )|\frac{2 b}{a+b}\right )+\frac{1}{8} \sec ^3(c+d x) \left (\left (8 b^3-12 a^2 b\right ) \cos (2 (c+d x))+\left (3 b^3-4 a^2 b\right ) \cos (4 (c+d x))+8 a^2 b+24 a^3 \sin (c+d x)+8 a^3 \sin (3 (c+d x))-24 a b^2 \sin (c+d x)-8 a b^2 \sin (3 (c+d x))-11 b^3\right )}{6 d (a-b) (a+b) \sqrt{a+b \sin (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.571, size = 1259, normalized size = 5.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sqrt{b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]